JavaScript

A5.Selectpopulate Method

Syntax

A5.Select.populate(options[,keepValue])

Arguments

optionsarray

An array of options. Each option can be an object with "value" and "text" properties, or a string.

keepValueboolean

Whether or not to keep the previous value(s) of the SELECT, or reset it.

Description

Populate the SELECT with new options.

Example

// assume sObj is a pointer to an instance of the A5.Select class
var ops = [
	{value: 'NY', text: 'New York'},
	{value: 'CA', text: 'California'},
	'DC'
];
sObj.populate(ops);